<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru">

<head><title>Banners</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <link href="css/common.css" rel="stylesheet" type="text/css">
</head>

<body>
<f:view>
    <f:loadBundle basename="ResourceBundle" var="bundle"/>
    <h:form id="audioContentForm">
        <div id="external">
            <div id="menu">
                <h:outputText value="#{bundle.menu_title}"/>
                <br>
                <%@ include file="menu.jsp" %>
            </div>
            <div id="languages">
                <div class="internal-languages">
                    <strong>
                        <h:commandLink value="EN"/>
                        <h:commandLink value="HI"/>
                        <h:commandLink value="TAM"/>
                    </strong>
                </div>
            </div>


            <div id="content">
                <div id="title"> ${bundle.banners_header}</div>

                <div id="top-left-filters">
                    <br>
                    <h:outputText value="#{bundle.find_banner_by_id}"/>
                    <h:inputText style="width: 50px"/>
                    <h:commandButton value="#{bundle.ok_button}" style="width:50px"/>

                    <br>
                    <h:outputText value="#{bundle.find_banner_by_name}"/>
                    <h:inputText/>
                    <h:commandButton value="#{bundle.ok_button}" style="width:50px"/>

                    <br>
                    <h:outputText value="#{bundle.find_banner_by_advertiser}"/>
                    <h:inputText style="width: 100px" readonly="true"/>
                    <h:commandButton value="#{bundle.ok_button}" style="width:50px"
                                     actionListener="#{audioContentBean.findAudioContentByAdvertiser}"/>
                </div>

                <div id="top-right-filters">
                    <br>
                    <h:outputText value="#{bundle.rowCountOnPage}"/>
                    <h:inputText style="width: 100px"/> <br>
                    <h:commandButton value="#{bundle.ok_button}" style="width:50px"/>
                    <br>
                    <h:outputText value="#{bundle.fullRowCount}"/>
                    <h:inputText value="4" style="width: 100px"/>
                    <br>
                </div>

                <div id="data-table">
                    <h:dataTable value="#{bannerBean.bannerDecorators}" var="banner" border="1" width="100%"
                                 headerClass="table-header">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="banner_ID"/>
                            </f:facet>
                            <h:outputText value="#{banner.banner_ID}"/>
                        </h:column>

                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Name"/>
                            </f:facet>
                            <h:outputText value="#{banner.name}"/>
                        </h:column>

                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Advertiser"/>
                            </f:facet>
                            <h:outputText value="#{banner.advertiser}"/>
                        </h:column>

                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Display pages"/>
                            </f:facet>
                            <h:outputText value="#{banner.printingPages}"/>
                        </h:column>

                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="From"/>
                            </f:facet>
                            <h:outputText value="#{banner.beginDate}"/>
                        </h:column>

                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="To"/>
                            </f:facet>
                            <h:outputText value="#{banner.endDate}"/>
                        </h:column>

                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Activity"/>
                            </f:facet>
                            <h:outputText value="#{banner.activity}"/>
                        </h:column>

                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Edit"/>
                            </f:facet>
                            <h:commandButton value="#{bundle.edit_button}" action="#{bannerBean.editBanner}">
                                <f:param name="edit_banner" value="#{banner.banner_ID}"/>
                            </h:commandButton>
                        </h:column>
                    </h:dataTable>
                </div>

                <div id="page-navigation">${bundle.navigation}</div>
                <div style="position:absolute;top: 60%; height: 5%; right: 5%">
                    <h:commandButton value="#{bundle.addButton}" action="#{bannerBean.addBanner}"/>
                </div>

                <div style=" position: absolute; float: left; background-color:#7ccff5; bottom: 2%; height: 23%; left:2%; width: 30%;">
                    <br>
                    <br>
                    <br>
                    <h:outputText style="font-weight: bold;" value="#{bundle.choosing_by_dates}"/>
                    <br>
                    <h:outputText value="#{bundle.begin_date}"/>
                    <h:inputText style="width: 100px"/>
                    <br>
                    <h:outputText value="#{bundle.end_date}"/>
                    &nbsp;<h:inputText style="width: 100px"/>
                    <br>
                    <h:commandButton value="#{bundle.ok_button}"/>
                </div>

                <div style=" position: absolute;float: left; background-color:#7ccff5; bottom: 2%; height: 23%; left:34%; width: 32%;">
                    <div id="statuses-filters-inside">
                        <h:outputText value="#{bundle.choosing_by_status}"/>
                        <br>
                        <h:selectOneMenu value="#{audioContentBean.chosenStatus}">
                            <f:selectItems value="#{audioContentBean.statuses}"/>
                        </h:selectOneMenu>
                        <br>
                        <h:commandButton value="#{bundle.ok_button}"/>
                    </div>
                </div>
            </div>
        </div>
    </h:form>
</f:view>
</body>
</html>
